package com.appspot.mscheckers.core;

import java.util.ArrayList;

public class Main{

/*public static void main(String[] args){
	char p1 = 'f';
	char p2 = 'v';
	int i,j;
	char[][] cs = new char[10][10];
	//char[][] cl;
	//ArrayList<ArrayList<Position> > mt;
		for(j = 0; j < 10; j++)
		{ 
			for(i = 0; i <10 ; i++)
			{ 
				cs[j][i] = p1;
				if( p1 == p2 ) p1 = 'f'; else p1 = p2;
			}
			if( p1 == p2 ) p1 = 'f'; else p1 = p2;
			if( j >= 3 && j <= 4) p2 = 'v';
			else if( j >= 5 )p2 = 'v';
		}
		//cs[8][1] = 'w';
		//if( Position.pawnBetween(new Position(6,3),new Position(9,0), cs) == true) System.out.println("bonjour");
		//else System.out.println("nothing man");
		/*Position p = new Position(8,1);
		Position pos1 = new Position(1,2);
		Position pos2 = new Position(7,8);
		if(p.between(pos1,pos2) == true) System.out.println("OK");
		else System.out.println("NO");*/
		
		//cs[5][4] = 'W';
		//cs[6][1] = 'w';
		//cs[8][3] = 'b';
		/*cs[3][4] = 'b';
		cs[3][6] = 'b';
		cs[5][4] = 'b';
		cs[5][6] = 'b';
		cs[5][8] = 'b';
		//cs[5][2] = 'b';
		
		cs = CheckerModel.checkerBoard();
		//Player plyr = new Player("moise",22,'w');
		//mt = new MoveTree(7,8,cs,-1);
		//MInt h = new MInt(0);
		//MoveTree mt = new MoveTree(6,9,cs, h);
		//System.out.println("\nhauter = "+h.getInt());
		//System.out.println("\nSheet = "+mt.getNode().sheet);
		//afficher(Position.posBetween( new Position(9,0),new Position(0,9)));
		Position mt[][] = MoveTable.moveTable(cs,'w');
		//mt.out(mt,0,h.getInt()+1);
		//ArrayList<ArrayList<Position> > mtab;
		//mtab = plyr.play(cs);
		for( i = 0; i < mtab.size(); i++ )
		{
			for(j = 0; j < mtab.get(i).size(); j++ )System.out.print("( "+mtab.get(i).get(j).getY()+" , "+mtab.get(i).get(j).getX()+" )");
		System.out.println();	
		}
		//System.out.println();
		//System.out.println("mmmmmmmmmmove	Table\n");
		//mt.out(mt,0,h.getInt()+1);
		//afficher(mtab);
		afficher(mt);
		afficher(cs);
	}*/
	
	public static void afficher(Position[][] mt)
	{
		for(int j = 0; j < mt.length; j++ )
		{
			for(int i = 0; i < mt[j].length; i++ )
				System.out.print(mt[j][i].getY()+"_"+mt[j][i].getX()+"\t");
			System.out.println();
		}
	}
	
	public static void afficher(char[][] cc)
	{
		String t="";
		int i,j;
		if( cc != null )
		for(j = 0; j < cc.length; j++)
		{ 
			for(i = 0; i <cc[j].length ; i++)
			{ 
				t = t + (new String(cc[j][i]+"  "));
			}
			t = t +"\n";
		}
		System.out.println(t+"\n");
	}
	
	public static void afficher(ArrayList<ArrayList<Position> > m)
	{
		int n = m.size();
		if( n >0)
		{
		int k = m.get(0).size();
			for(int j = 0; j < k; j++ )
			{
				for(int i = 0; i < n;i++ )
					System.out.print(m.get(i).get(j).getY()+"_"+m.get(i).get(j).getX()+"  ");
			System.out.println();
			}
		}
	}
	
	public static void afficher1(ArrayList<Position> alp)
	{
		int n = alp.size();
		if( n >0)
				for(int i = 0; i < n;i++ )
					System.out.print(alp.get(i).getY()+"_"+alp.get(i).getX()+"  ");			
	}
	
	public static void afficher(Position[] pos)
	{
		for(int i = 0; i < pos.length; i++ )
			System.out.print(pos[i].getY()+"_"+pos[i].getX()+"\t");
	}
}








